<?php include incTemplate('header');?>
<script>
$(function(){
    $('#win_login').window({  
        modal:true,
        closable:false,
        width:350,
        height:250,
        draggable:false,
        minimizable:false,
        maximizable:false,
        collapsible:false
    });  


    $("#btn_login").click(function(){
        var param = {loginname:$("#loginname").val(),loginpass:$("#loginpass").val()};
		$.post('/admin.php/admin/login',param,function(message){
			if(message['success']==true){
				window.location.href="/admin.php/admin/console";
			}else{
				$.messager.alert('提示',message['message']);  
			}
		},'json');
    });

    $("#btn_reset").click(function(){
		$("#loginname").val("");
		$("#loginpass").val("");
    });
    
});
</script>
</head>
<body>
<div class="hidden">
<form id="form_login" method="post" >
<div id="win_login" title="管理员登入">
<table class="tab_form" style="margin-top:50px;">
	<tr>
		<td class="edit_td" width="80px">用户名：</td><td class="rig_td">
		<input type="text" name="loginname" id="loginname" class="w_200" />
		</td>
	</tr>
	<tr>
		<td class="edit_td">密码：</td><td class="rig_td">
		<input type="password" name="loginpass" id="loginpass" class="w_200" />
		</td>
	</tr>
	<tr>
		<td></td>
		<td><input id="btn_login" type="button" value="登入"/>&nbsp;&nbsp;<input type="button" id="btn_reset" value="重置"/></td>
	</tr>
</table>
</div>
</form>
</div>
</body>
</html>
